Automated and heuristically managed solution to quantify cpu and path length cost of instructions added, changed or removed by a service team

ABSTRACT

Embodiments of the present invention provide a method, system, and computer program product for qualifying changes to an instruction set in source code. In an embodiment of the invention, a method for quantifying changes to an instruction set in source code can be provided. The method can include receiving text in a code editor as an edit to source code of a computer program querying a data store of code change costs with at least a portion of the edit. The method additionally can include retrieving in response to the query a code change cost associated with the edit. Finally, the method can include displaying in the code editor the retrieved code change cost.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to program code development and moreparticularly to capturing performance data for newly developed orchanged code.

2. Description of the Related Art

Software testing is an investigation conducted to determine the qualityof a software product or service under test. Software testing can beperformed by the programmer or team of programmers who had developed thesoftware program code of the software product in the first instance, orfor more organized efforts, by a group of dedicated software testers orquality assurance testers. The testers typically use different types oftesting methods, including white box testing, black box testing, andgray box testing. White box testing refers to when a tester has accessto the internal data structures and algorithms including the computercode that implements the structures and algorithms; black box testingtreats the software as a “black box”—without any knowledge of internalimplementation; and, gray box testing involves the tester havingknowledge of internal data structures and algorithms for the purpose ofdesigning test cases, but testing at the user, or black-box level.

During the development phase for a new release of an application undertest, part of the testing of a new code base of the application undertest involves capturing performance data, such as central processingunit (CPU) usage resulting from the application under test. Performancemeasurement usually involves running sets of well-defined test casesagainst the application under test and using system tooling to measureconcomitant changes to the system performance resulting from theexecution of the application under test when compared to earlierreleases of the application under test. In addition, software monitoringproducts can generate additional data from the execution of theapplication under test, which can provide a coarse level of CPU-usage atthe region level and at an individual transaction level.

But, a tester using software monitoring tools to test an applicationunder test still must use a “post-processing tool” to analyze andbreakdown performance data collected during testing. In addition, atester still must run specific benchmark comparisons on differentcomputing systems to compare and then contrast CPU costs for code pathsused for specific workloads in testing an application under test.Oftentimes, this level of in-depth performance analysis and testing isnot available to support and service software developers deployingchanges to an application under test. Thus, software developers oftenmust apply small alterations to existing programs and work to schedulesthat preclude complete performance reevaluations of an application undertest after each of the changes have been applied to the applicationunder test. With no analysis and testing tools available, performancemetrics thus are only based upon the experience and best judgment of thesoftware developer.

BRIEF SUMMARY OF THE INVENTION

Embodiments of the present invention address deficiencies of the art inrespect to reporting on performance effects of changes made to sourcecode during the maintenance of software and provide a novel andnon-obvious method, system, and computer program product for qualifyingchanges to an instruction set in source code. In an embodiment of theinvention, a method for qualifying changes to an instruction set insource code can be provided. The method can include receiving text in acode editor as an edit to source code of a computer program querying adata store of code change costs with at least a portion of the edit. Themethod additionally can include retrieving in response to the query acode change cost associated with the edit. Finally, the method caninclude displaying in the code editor the retrieved code change cost.

In one aspect of the embodiment, the code editor is part of anintegrated development environment (IDE). In another aspect of theembodiment, the edit can be an added instruction in a CustomerInformation Control System (CICS) transaction server environment. In yetanother aspect of the embodiment, the code change cost can be a valuecorresponding to either or any combination of a change in centralprocessing unit (CPU) usage, a change in code execution path length orresponse time. In even yet another aspect of the embodiment, performancedata resulting from an execution of instructions can be monitored andthe data store of code changes can be updated with performance dataresulting from the execution of the instructions including at least oneof CPU usage, path length and response time.

In another embodiment of the invention, a change quantification systemhas been provided. The system can include a server computer configuredfor communicative coupling to a client computer over a computercommunications network and a data store of code change costs coupled tothe server. The system additionally can include a code editor executingin memory of the server computer and an instruction set cost servermodule coupled to the code editor. The module can include program codeenabled when executing in the memory of the server to receive aninstruction set query from the client, to respond to a text edit of codeinstructions in the code editor by querying the data store of codechange costs with at least a portion of the text edit, by retrieving inresponse to the query a code change cost associated with the text editand by displaying in the code editor the retrieved code change cost.

Another embodiment of the invention provides for a change qualificationsystem. The system can include a server coupled to a historical databaseconfigured to support an instruction set cost server module. The servercan be networked to a client configured to support a display, anapplication, and an instruction set cost client module. The instructionset cost server module can include program code for receiving aninstruction set query from the client, determining cost information forthe instruction set, and sending cost information to the client. Theinstruction set cost client module can include program code for queryinga historical database for instruction set cost information, receivingcost information, displaying cost information, and submitting committedinstruction set code changes.

Additional aspects of the invention will be set forth in part in thedescription which follows, and in part will be obvious from thedescription, or may be learned by practice of the invention. The aspectsof the invention will be realized and attained by means of the elementsand combinations particularly pointed out in the appended claims. It isto be understood that both the foregoing general description and thefollowing detailed description are exemplary and explanatory only andare not restrictive of the invention, as claimed.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute partof this specification, illustrate embodiments of the invention andtogether with the description, serve to explain the principles of theinvention. The embodiments illustrated herein are presently preferred,it being understood, however, that the invention is not limited to theprecise arrangements and instrumentalities shown, wherein:

FIG. 1 is a pictorial illustration of a process for qualifying changesto an instruction set in source code;

FIG. 2 is a schematic illustration of a change quantification systemconfigured to quantify changes to an instruction set in source code;and,

FIG. 3 is a flow chart illustrating a process for qualifying changes toan instruction set in source code.

DETAILED DESCRIPTION OF THE INVENTION

Embodiments of the invention provide for predicting performanceconsequences for a change in code instructions within source code of acomputer program. In accordance with an embodiment of the invention,proposed changes to source code applied by way of an edit to the sourcecode can be monitored. Upon detecting edit to the source code,specifically an addition, change or deletion of a specific codeinstruction within the source code, an end user, for instance a computerprogram developer, can receive predicted consequential information,namely code change cost values predicted for the edit. The code changecost values can include, by way of example, an expected change in CPUconsumption, a change in overall instruction path length, and anexpected change in wall clock elapsed time when executing the portion ofcode affected by the proposed edit. In this way, the impact of the editcan be visualized by the end user without requiring the end user toseparately execute resource and time consumptive benchmark comparisontests.

In further illustration, FIG. 1 pictorially shows a process forqualifying changes to an instruction set in source code. As shown inFIG. 1, an end user 101, such as a change team programmer, works on aclient 110 by modifying particular instructions within source code 120,for instance adding instructions to source code 130 or deletinginstructions from source code 140. Upon modifying the source code 120,instruction set cost client logic 150B can send an instruction set queryto a server 105. Upon receiving the instruction set query from theclient 110, instruction set cost server logic 150A on the server 105 candetermine cost information 170 for the instruction set that wasmodified. Cost information 170 can include but not be limited to CPUcost, path length changes, and wall clock elapsed time.

Upon determining cost information 170, instruction set cost server logic150A can send the calculated cost information 170 to the client 110.Instruction set cost client logic 150B can display 160 the results onthe client 110 to an end user 101. For instance, implementing a codechange for a specific instruction set could lead to a display 160 thatreported:

-   -   “This proposed code change can lead to a CPU increase of 0.25%        over a system without such a code change applied. Use of the X        instruction per se can lead to a CPU increase of 0.15% over a        system without such code applied. Use of the remaining        instructions can lead to a CPU increase of 0.1% over a system        without such code applied. This proposed code change can lead to        an overall instruction path length increase of 50 instruction        cycles over a base system without such code applied. This        proposed code change can lead to an overall instruction path        length increase of 34 instruction systems over a best so far        system without such code applied.”        Of note, “X” represents use of a specific instruction set or        combination of instruction sets. Of further note, the cost        information 170 can also be hard coded within an application,        such as an editor, compiler, or integrated development        environment (IDE). In addition, the cost information 170 can        also be provided to an end user 101 during product development.        Cost information 170 can also be updated as service ship changes        to the product the end user 101 is supporting, so up-to-date        information for “best so far” programs, with all service fixes        applied to them, can be known as well.

A historical database 115 can also be coupled to the server 105. Thehistorical database can record the cost information 170, including CPUcosts and path length increases, for different sets of instructions inorder to create a historical record of changes made to the source code.A client 110 via instruction set cost client logic 150B can query thehistorical database 115 coupled to the server 105 and retrieve costinformation 170 that can then be displayed 160 to the end user 101 onthe client 110. Of note, the historical database can be updated by theclient 110 through instruction set cost client logic 150B as changes tothe source code base are committed. In this way, the historical database115 can grow to provide an accurate historical record of the costs 170of using specific instructions for a given program. Instruction set costserver logic 150A can use the data in the historical database 115 tolearn from changes in the past and heuristically reflect these changesin its recommendation to the end user 101 when source code 120 is to bealtered in the future. In addition, instruction set cost server logic150A can share cost information 170 with other programs; in this way,the historical knowledge built up for one particular instruction set canbe made available to other programs within a product an end user 101might want to modify in the future.

The process described in connection with FIG. 1 can be implemented in achange quantification system. In further illustration, FIG. 2 shows aschematic illustration of a change quantification system configured toquantify changes to an instruction set in source code. The system caninclude a server 200. The server 200 can include at least one processor220A, memory 210A, and an operating system (O/S) 230A supporting theexecution of an instruction set cost server module 300A. The instructionset cost server module 300A can communicate over a communicationsnetwork 250 with an instruction set cost client module 300B on a client240. The communications network 250 is not limited to a specific type ofnetwork, but can include Ethernet, Internet, wireless communications,4G, and 3G.

Each client 240 can include one processor 220B, memory 210B, and an O/S230B. The O/S 230B can support the operation of a display 260 executingan application 280. The application 280 can include programmer tools,including but not limited to a compiler, an IDE, an editor as well asany other application that allows an end user, such as a programmer tomodify, for instance, adding, changing, or deleting source code orinstruction sets for source code. For simplicity, the presence of aprocessor 220B, memory 210B, O/S 230B, display 260, application 280, andinstruction set cost client module 300B is only shown once, but canexist on each client 240.

The instruction set cost server module 300A can include program code,which when executed by at least one processor 220A on the server 200responds to receiving an instruction query set query from a client 240.Upon receiving the instruction set, cost information for the instructionset can be determined. Cost information can include capturing CPU usage,instruction path length, machine cycles, and response time for specificchanges to instruction sets within source code. In one instance, a tracecan be used to capture cost information. Upon determining the costinformation for the instruction set, the cost information can be sent tothe client 240. In another instance, cost information can be captured byutilizing run-time execution data captured by performance metricsgathered when executing system software. In this way, existing benchmarkpath lengths and CPU costs involved in executing the functionality withthe code can be captured. This information can then be used to quantifyinformation related to projected cost of changes to code.

The instruction set cost server module 300A can further include programcode to maintain a historical database 270 coupled to the server 200.The historical database 270 can store cost information, such as CPUusage and path length, for different sets of instructions. The programcode can further be enabled to update the historical database 270 uponan end user committing changes to source code for an instruction set. Inthis way, the historical database 270 can grow to provide a historicalrecord of the costs in using specific instructions for a given program.Instruction set cost server module 300A can even further be enabled toprovide a recommendation to an end user via a client 240 based upon thehistorical record of the cost of using an instruction set.

Of note, the program code of the instruction set cost server module 300Acan further be enabled to provide information on the likely effects ofCPU increase or path length change or other cost information upon anyiterative features of the source code. For instance, if the new code ispart of a loop, then ranges for iterating a loop code can be used toreport on the likely impact on CPU usage and path length. The programcode can also be further enabled to report cost information based upondifferent classes of hardware. The program code can yet be furtherenabled to provide context-relevant information about the likely cost ofmodifying instructions within particular parts of source code.

For instance, changes to mainline source code paths would be executedfar more often than changes made to recovery routines or error handlingpaths. Instruction set cost server module 300A can also be used todetermine cost information for more general changes to code, such asinserting instructions to call a subroutine or environmental operations,including changing the source code to enable another subsystem asopposed to specific instructions. The module 300A can determine thelikely effect based upon existing data from other parts of the sourcecode that perform similar operations, since the code most likely callsmacros, functions, and involves more complex code path, so just usingperformance metrics is not an option.

The instruction set cost client module 300B can include program code,which when executed by at least one processor 220B on the client 240 canquery a historical database 270 coupled to a server 200 via theinstruction set cost server module 300A for cost information for aninstruction set. Of note, in one instance, the client module 300B can beincorporated into programmer tools, including but not limited to acompiler and IDE. Upon receiving the cost information, the instructionset cost client module 300B can display the cost information on adisplay 260 supported by the 0/S 230B of the client 200. The clientmodule 300B can further be enabled to submit committed changes. In thisway, the historical database 270 can be updated to provide an accuraterecord of the cost of using specific instructions for a given program.

In even yet further illustration of the operating of the program code ofthe instruction set cost client module 300B and the instruction set costserver module 300A, FIG. 3 is a flow chart illustrating a process forqualifying changes to an instruction set in source code. In step 305, aninstruction set cost client module can query a historical database forcost information for an instruction set. In step 310, an instruction setcost server module can receive the instruction set query and can thendetermine cost information for the instruction set, as shown in step320. In one instance, cost information, including CPU costs, such as CPUusage, path length changes, such as increases, and response time, can becaptured by utilizing run-time execution data from performance metrics.In other instance, a trace can be used. The server module can then sendcost information to the client module, as indicated in step 330.

Upon receiving the cost information, as in step 335, the client modulecan display the cost information to an end user, as in step 345. In step355, the client module can submit committed instruction set codechanges. In step 360, upon receiving the committed instruction set code,the server module, can update an historical database, as shown in step370. In this way, the historical database can grow to provide anaccurate historical record of the cost in using specific instructionsfor a given program. In step 380, the server module can learn fromchanges (to an instruction set) in the past and reflect theses changesin recommendations for code changes the server module makes in thefuture, as shown in step 390. In this way, based on the recommended codechanges, the server module can also provide cost information to theclient, which can guide an end user on the likely effect of changingtheir code based upon prior experience of specific program changes. Instep 395, the server module can share cost information, if so desired,between program environments.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, radiofrequency, and the like, or anysuitable combination of the foregoing. Computer program code forcarrying out operations for aspects of the present invention may bewritten in any combination of one or more programming languages,including an object oriented programming language and conventionalprocedural programming languages. The program code may execute entirelyon the user's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention have been described above withreference to flowchart illustrations and/or block diagrams of methods,apparatus (systems) and computer program products according toembodiments of the invention. In this regard, the flowchart and blockdiagrams in the Figures illustrate the architecture, functionality, andoperation of possible implementations of systems, methods and computerprogram products according to various embodiments of the presentinvention. For instance, each block in the flowchart or block diagramsmay represent a module, segment, or portion of code, which comprises oneor more executable instructions for implementing the specified logicalfunction(s). It should also be noted that, in some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts, or combinations of special purpose hardware andcomputer instructions.

It also will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks. The computer program instructions may also beloaded onto a computer, other programmable data processing apparatus, orother devices to cause a series of operational steps to be performed onthe computer, other programmable apparatus or other devices to produce acomputer implemented process such that the instructions which execute onthe computer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

Finally, the terminology used herein is for the purpose of describingparticular embodiments only and is not intended to be limiting of theinvention. As used herein, the singular forms “a”, “an” and “the” areintended to include the plural forms as well, unless the context clearlyindicates otherwise. It will be further understood that the terms“comprises” and/or “comprising,” when used in this specification,specify the presence of stated features, integers, steps, operations,elements, and/or components, but do not preclude the presence oraddition of one or more other features, integers, steps, operations,elements, components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present invention has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

Having thus described the invention of the present application in detailand by reference to embodiments thereof, it will be apparent thatmodifications and variations are possible without departing from thescope of the invention defined in the appended claims as follows:

We claim:
 1. A method for qualifying changes to an instruction set insource code comprising: receiving text in a code editor as an edit tosource code of a computer program querying a data store of code changecosts with at least a portion of the edit; retrieving in response to thequery a code change cost associated with the edit; and, displaying inthe code editor the retrieved code change cost.
 2. The method of claim1, wherein the code editor is part of an integrated developmentenvironment (IDE).
 3. The method of claim 1, wherein the edit is anadded instruction in a Customer Information Control System (CICS)transaction server environment.
 4. The method of claim 1, wherein thecode change cost is a value corresponding to a change in centralprocessing unit (CPU) usage.
 5. The method of claim 1, wherein the codechange cost is a value corresponding to a change in path length.
 6. Themethod of claim 1, wherein the code change cost is a value correspondingto response time.
 7. The method of claim 1, further comprising:monitoring performance data resulting from an execution of instructions;and, updating the data store of code changes with performance dataresulting from the execution of the instructions including at least oneof central processing unit (CPU) usage, path length and response time.8. A change quantification system comprising: a server computerconfigured for communicative coupling to a client computer over acomputer communications network; a data store of code change costscoupled to the server; and, a code editor executing in memory of theserver computer; an instruction set cost server module coupled to thecode editor, the module comprising program code enabled when executingin memory of the server to receive an instruction set query from theclient, to respond to a text edit of code instructions in the codeeditor by querying the data store of code change costs with at least aportion of the text edit, by retrieving in response to the query a codechange cost associated with the text edit and by displaying in the codeeditor the retrieved code change cost.
 9. The system of claim 8, whereinthe code editor is part of an integrated development environment (IDE).10. The system of claim 8, wherein the edit is an added instruction in aCustomer Information Control System (CICS) transaction serverenvironment.
 11. The system of claim 8, wherein the code change cost isa value corresponding to a change in central processing unit (CPU)usage.
 12. The system of claim 8, wherein the code change cost is avalue corresponding to a change in path length.
 13. The system of claim8, wherein the code change cost is a value corresponding to responsetime.
 14. A computer program product for qualifying changes to aninstruction set in source code, the computer program product comprising:a computer readable storage medium having computer readable program codeembodied therewith, the computer readable program code comprising:computer readable program code for receiving text in a code editor as anedit to source code of a computer program querying a data store of codechange costs with at least a portion of the edit; computer readableprogram code for retrieving in response to the query a code change costassociated with the edit; and, computer readable program code fordisplaying in the code editor the retrieved code change cost.
 15. Thecomputer program product of claim 14, wherein the code editor is part ofan integrated development environment (IDE).
 16. The computer programproduct of claim 14, wherein the edit is an added instruction in aCustomer Information Control System (CICS) transaction serverenvironment.
 17. The computer program product of claim 14, wherein thecode change cost is a value corresponding to a change in centralprocessing unit (CPU) usage.
 18. The computer program product of claim14, wherein the code change cost is a value corresponding to a change inpath length.
 19. The computer program product of claim 14, wherein thecode change cost is a value corresponding to response time.
 20. Thecomputer program product of claim 14, further comprising: computerreadable program code for monitoring performance data resulting from anexecution of instructions; and, computer readable program code forupdating the data store of code changes with performance data resultingfrom the execution of the instructions including at least one of centralprocessing unit (CPU) usage, path length and response time.